<template>
<div>
  <slot name="title"></slot>
  <h1>header</h1>
   <p>{{message}}</p>
  <slot name="text"></slot>
</div>
</template>

<script>
import {bus} from "../main";

let data = {
  list:  ['a','b'],
  message:'hello header'
}

export default {
  name: "Header",
  data() {
    return data
  },
  methods:{
    changeMessage:function (){

    }
  },
  created() {
    bus.$on("changeMessage",(data)=>{
      this.message = data
    })
  }
}
</script>

<style scoped>

</style>
